package com.haixiaoke.saas.repository.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.haixiaoke.saas.repository.core.BaseEntity;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * 公寓账单对象 biz_apartment_bill
 *
 * @author qixi
 * @date 2023-06-16
 */
@Data
public class ApartmentBill extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 未缴费
     */
    public static final Integer PAY_STATUS_NO = 1;

    /**
     * 已缴费
     */
    public static final Integer PAY_STATUS_YES = 2;

    /**
     * 账单审核状态 : 2-已审核
     */
    public static final Integer BILL_AUDIT_STATUS_TRUE = 2;
    /**
     * 账单审核状态 : 1-未审核
     */
    public static final Integer BILL_AUDIT_STATUS_FALSE = 1;

    /**
     * redisKey
     */
    public static final String REDIS_BILL_KEY = "BILL_KEY:";            //缓存账单id的前缀


    /** 账单id */
    private String billId;

    /** 规则id */
    private Long ruleId;

    /** 订单id */
    private String orderId;

    /** 机构id */
    private Long orgId;

    /** 房屋id */
    private String houseId;

    /** 账单金额 */
    private Double billCost;

    /** 审核状态: 1未审核 2已审核 */
    private Integer auditStatus;

    /** 账单开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date startTime;

    /** 账单结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date endTime;

    /** 缴费截止时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date payDeadline;

    /** 缴费时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date payTime;

    /** 缴费状态: */
    private Integer payStatus;

    /**
     * 预约人id
     */
    private String reservationId;

    /**
     * 预定人名称
     */
    private String reservationName;

    /**
     * 预订人电话
     */
    private String reservationPhone;

    /** 小区id */
    private String residenceCommunityId;
    /** 楼栋 */
    private Long buildingNum;
    /** 单元 */
    private Long unit;
    /** 房号 */
    private String roomNumber;

    private String userId;

    /**
     * 收费项目用量列表
     */
    List<ApartmentChargeItemUsage> usages;

}
